﻿using System;

namespace implicit_隐式转换_
{
    class Program
    {
        static void Main(string[] args)
        {
            KeyCode key = new KeyCode()
            {
                KeyValue = 2,
            };
            //不需要强制转换
            MouseCode mouse = key;
            Console.WriteLine("MouseValue = " + mouse.MouseValue);
            Console.ReadKey();
        }
    }
}
